﻿using System;

namespace DesignModeConsole.OOPAndPOP;

/// <summary>
/// 抽象动物类
/// </summary>
public abstract class Animal
{
    /// <summary>
    /// 包含实现的方法
    /// </summary>
    public void Set()
    {
        Console.WriteLine("吃东西");
    }

    /// <summary>
    /// 抽象方法，不包含方法实现
    /// </summary>
    public abstract void Sleep();
}

public class Dog : Animal
{
    public override void Sleep()
    {
        throw new NotImplementedException();
    }
}

public class Test
{
    public void Sample()
    {
        var animal = new Dog();
        animal.Sleep();
    }
}
